#include				"ApiNetwork.h"
#include				"network.h"

ApiNetwork::ApiNetwork(Network * network) : _manager(network)
{

}

ApiNetwork::~ApiNetwork()
{

}

void					ApiNetwork::send(Packet *packet, unsigned int id)
{
	_manager->_tcpServer.sendPacket(packet, id);
}


unsigned int			ApiNetwork::getId(std::string ip)
{
	return _manager->_tcpServer.getId(ip);
}

std::string				ApiNetwork::getIp(unsigned int id)
{
	return _manager->_tcpServer.getIp(id);
}

bool					ApiNetwork::isOpen(unsigned int id)
{
	return _manager->_tcpServer.isOpen(id);
}

void					ApiNetwork::closeSocket(unsigned int id)
{
	_manager->_tcpServer.closeSocket(id);
}